<?xml version="1.0" encoding="UTF-8"?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui" template="/masterPage.xhtml">
	<ui:define name="content">
		<h:form id="languages_form">
			<p:growl id="messages1" showDetail="true" sticky="true" />

			<p:toolbar id="toolbar" style="margin-top:20px; margin-bottom:5px">
				<p:toolbarGroup align="left">
					<p:commandButton value="New Language"
						action="#{languagesBean.showDialog}" style="font-size: 85% !important"/>
				</p:toolbarGroup>

			</p:toolbar>

			<p:dataTable id="langusgesTable" var="lang"
				value="#{languagesBean.languages}" rowKey="#{lang.id}"
				selection="#{languagesBean.selectedLanguage}" selectionMode="single">
				<p:column id="language_id" headerText="ID" sortBy="#{lang.id}">
					<h:outputText value="#{lang.id}" />
				</p:column>
				<p:column id="language_name" headerText="Language Name">
					<h:outputText value="#{lang.name}" />
				</p:column>
			</p:dataTable>
		</h:form>
		<h:form id="nldlg_form">
			<p:dialog id="nldlg" header="New Language"
				widgetVar="nldlg" modal="true">
				<ui:include src="dialogs/newLanguageDialog.xhtml" />
			</p:dialog>
		</h:form>
	</ui:define>
</ui:composition>
